<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@include file="/common/taglibs.jspf"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>机行天下</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<!-- link rel="shortcut icon" href="" type="image/x-icon" /> -->
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resource/css/login.css" />
	<script type="text/javascript" language="javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
	
	<script type="text/javascript" language="javascript">
		$(document).ready(function(){
			$("#userName").blur(function(){
				if($(this).val()==""){
					$(this).next().html("<font style='font-size:9px;'>用户名不能为空</font>").css("color","red");
					$(this).onforce();
				}else{
					$(this).next().html('');
				}
			});
			$("#userPwd").blur(function(){
				if($(this).val()==""){
					$(this).next().html("<font style='font-size:9px;'>密码不能为空</font>").css("color","red");
					$(this).onforce();
				}else{
					$(this).next().html('');
				}
			});
			$("#load").click(function(){
				$("form").submit(function(){
					var userName = $("#userName").val().trim();
					var userPwd = $("#userPwd").val().trim();
					if(userName == ""){
						$("#userName + span").html("<font style='font-size:9px;'>用户名不能为空</font>").css("color","red");
						return false;
					}
					if(userName == ""){
						$("#userPwd + span").html("<font style='font-size:9px;'>密码不能为空</font>").css("color","red");
						return false;
					}
				});
			});
		});
	</script>
  </head>
  
  <body >
  	<div id="bg"><img src="${pageContext.request.contextPath}/resource/imgs/login/login_bg.jpg"></div>
    <div id="center">
    	<form name="loginForm" id="loginForm" method="post" action="${pageContext.request.contextPath}/login.do?action=loading">
    		<table cellspacing=0 cellpadding=0>
    		<tr><td class="login_label">用户：</td><td><input id="userName" name="userName" type="text"/><span></span></td></tr>
    		<tr><td class="login_label">密码：</td><td><input id="userPwd" name="userPwd" type="password"/><span></span></td></tr>
    		<tr><td colspan=2 style="text-align:center;"><input id="load" type="submit" value="登录" /></td></tr>
    		</table>
    	</form>
    </div>
  </body>
</html>
